const { Sequelize } = require('sequelize');
require('dotenv').config();

const sequelize = new Sequelize('custom_order_management', 'root', 'jQ6w2uwY', {
  host: process.env.MYSQL_HOST || 'localhost',
  port: process.env.MYSQL_PORT || 3306,
  dialect: 'mysql',
  pool: {
    max: 5,
    min: 0,
    acquire: 30000,
    idle: 10000
  },
  define: {
    timestamps: true,
    underscored: true
  }
});

module.exports = sequelize; 